<% content_for :javascript do %>
  <%= javascript_include_tag 'swfupload' %>
  <%= javascript_include_tag 'handlers' %>
  <%= javascript_include_tag 'ScrollPic' %>
  <%= javascript_include_tag 'fckeditor/fckeditor' %>
  <%#= javascript_include_tag 'ckeditor/ckeditor' %>
<% end %>

<% content_for :css do %>
  <% #公共 %>
  <%= stylesheet_link_tag 'valleyer/personal/homeBase' %>
  <% #主页 %>
  <%= stylesheet_link_tag 'valleyer/personal/main' %>
  <% #个人信息 %>
  <%= stylesheet_link_tag 'valleyer/personal/message' %>
  <% #日志 %>
  <%= stylesheet_link_tag 'valleyer/personal/logManage' %>
  <% #添加日志 %>
  <%= stylesheet_link_tag 'valleyer/personal/addLog' %>
  <% #转载 %>
  <%= stylesheet_link_tag 'valleyer/personal/reship' %>
  <% #相册 %>
  <%= stylesheet_link_tag 'valleyer/personal/albumManage' %>
  <%= stylesheet_link_tag 'valleyer/personal/addPicture' %>
  <% #图片浏览的css %>
  <%= stylesheet_link_tag 'scan/scan_photo' %>
<% end %>

<script type="text/javascript">
  //输入框激活
  function createShow()
  {
    $("createBase").className = "createBase_show";
  }
  //输入框隐藏
  function createHide()
  {
    $("createBase").className = "createBase_hide";
  }
</script>
<div id="center_left">
  <div id="picture">
    <%= valleyer_logo_image_tag @valleyer, :width => 197, :height => 197 %>
  </div>
  <% if loggined_by? @valleyer %>
  <div class="operate">
    <%= link_to @valleyer.logo ? '修改头像' : '添加头像',
      new_valleyers_show_logo_url,
      :class => :change_picture
    %>
    <%= link_to_function '编辑资料',
      "buttonHighOrLow('personal_info')" ,
      :class => :edit_message
    %>
  </div>
  <% end %>
  <div class="message">
    <dl><dt>性&nbsp;&nbsp;&nbsp;&nbsp;别：</dt><dd><%= t @valleyer.sex %></dd></dl>
    <dl><dt>生&nbsp;&nbsp;&nbsp;&nbsp;日：</dt><dd><%= @valleyer.birthday %></dd></dl>
    <dl><dt>星&nbsp;&nbsp;&nbsp;&nbsp;座：</dt><dd><%= @valleyer.constellation %></dd></dl>
    <dl><dt>所&nbsp;在&nbsp;地：</dt><dd><%= @valleyer.hometown %></dd></dl>
    <dl><dt>来&nbsp;&nbsp;&nbsp;&nbsp;访：</dt><dd><%= @valleyer.browse_records_count %>人次</dd></dl>
  </div>
</div>
<div id="center_right">
  <div class="master">
    <div class="name"><%= @valleyer.nick_name %>:</div>
    <div id="status" class="status">
      <%= render :file => "valleyers/show/homes/show/moods/show.js" %>
    </div>
  </div>
  <div id="sstab">
    <div>
      <div class="nav_bar">
        <%= link_to_function "主页",
          "buttonHighOrLow('home_tag')",
          :id => "home_tag",
          :class => "button_h" %>
        <%= link_to_function "个人资料",
          "buttonHighOrLow('personal_info')",
          :id => "personal_info",
          :class => "button_l" %>
        <%= link_to_function "日志管理",
          "buttonHighOrLow('log')",
          :id => "log",
          :class => "button_l" %>
        <%= link_to_function "相册管理",
          "buttonHighOrLow('album')",
          :id => "album",
          :class => "button_l" %>
        <%= link_to_function "转载管理",
          "buttonHighOrLow('reship')",
          :id => "reship",
          :class => "button_l" %>
      </div>
    </div>
  </div>
  <div id="home_tag_mainstay" class="navlet" style="display:inline">
    <%= render :file => 'valleyers/show/_home.html' %>
  </div>
  <div id="personal_info_mainstay" class="navlet" style="display:none">
    <%= render :file => 'valleyers/show/_personal_info.html' %>
  </div>
  <div id="log_mainstay" class="navlet" style="display:none">
    <%= render :file => 'valleyers/show/_log.html' %>
  </div>
  <div id="album_mainstay" class="navlet" style="display:none">
    <%= render :file => "valleyers/show/_album.html" %>
  </div>
  <div id="reship_mainstay" class="navlet" style="display:none">
    <%= render :file => "valleyers/show/_reship.html" %>
  </div>
</div>
<script type="text/javascript">
  <% if params[:cmd] == "home_tags_index" %>
    buttonHighOrLow("home_tag");
  <% end %>
  <% if params[:cmd] == "personal_infos_index" %>
    buttonHighOrLow("personal_info");
  <% end %>
  <% if params[:cmd] == "albums_index" %>
    buttonHighOrLow("album");
  <% end %>
  <% if params[:cmd] == "new_album" %>
      buttonHighOrLow("album");
      $("new_album").onclick();
  <% end %>
  <% if params[:cmd] == "upload_photo" %>
    buttonHighOrLow("album");
    $("upload_photo").onclick();
  <% end %>
  <% if params[:cmd] == "show_album" %>
    buttonHighOrLow("album");
    $("show_album_<%= params[:album_id] %>").onclick();
  <% end %>
  <% if params[:cmd] == "edit_album" %>
    buttonHighOrLow("album");
    $("edit_album_<%= params[:album_id] %>").onclick();
  <% end %>
  <% if params[:cmd] == "logs_index" %>
    buttonHighOrLow("log");
  <% end %>
  <% if params[:cmd] == "new_log" %>
    buttonHighOrLow("log");
    $("new_log").onclick();
  <% end %>
  <% if params[:cmd] == "edit_log" %>
    buttonHighOrLow("log");
    $("edit_log").onclick();
  <% end %>
  <% if params[:cmd] == "delete_log" %>
    buttonHighOrLow("log");
    $("delete_log").onclick();
  <% end %>
  <% if params[:cmd] == "reships_index" %>
    buttonHighOrLow("reship");
  <% end %>
  <% if params[:cmd] == "new_reship" %>
    buttonHighOrLow("reship");
    $("new_reship").onclick();
  <% end %>
  <% if params[:cmd] == "edit_reship" %>
    buttonHighOrLow("reship");
    $("edit_reship").onclick();
  <% end %>
  <% if params[:cmd] == "delete_reship" %>
    buttonHighOrLow("reship");
    $("delete_reship").onclick();
  <% end %>
</script>